The Elder Scrolls Forums

TES Construction Set and Plugins
   >> General TES Construction Set
Thread views: 3910

Pages in this thread: 1 | 2 | 3 | 4 | (show all)   Print Thread
Amanita
(Layman)
10/11/02 12:39 PM
Lets make a command list!  

Ok everyone, I just spent hours on the forum searching for some commands to make a script, and eventually I found it, but I saw a lot of people say "There isnt one place to get all the commands" So. . .

LET's MAKE ONE!

Just post your favorite command, the syntax, and and example of how its used (be detailed) also, in the subject, list the commands you are talking about so others can avoid duplicate posts. If you have extra info on a command posted already, reply to that reply so that it will be separated below the command in question. New commands should be posted as reply to this post (I'm trying to keep it clean)

------------------------------------------------------------
There are 10 types of people: those who know binary and those who don't.
-Unknown

Post Extras: Print Post

Amanita
(Layman)
10/11/02 09:14 AM
PositionCell [re: Amanita] 

I'll start it off the wonderful PositionCell Command

PositionCell will take an object and send it the the specified X,Y,Z,Z-Rot location in the specified cell.
x=x-coordinate, y=y-coordinate, z=z-coordinate, z-rot=face what direction (0=North, 180=south,etc)

For example, to send the player to the small swampy pond in Seyda Neen, you would use this:

Player->PositionCell, -12432.038, -71190.727, 45.127, 0, "Seyda Neen -2,-9" ;Teleport Player to Seyda Neen Pond and face player north


------------------------------------------------------------
There are 10 types of people: those who know binary and those who don't.
-Unknown

Post Extras: Print Post

Amanita
(Layman)
10/11/02 09:30 AM
GetSecundusPhase [re: Amanita] 

I thought I would post this as well. In the TES help it lists 2 commands:
GetMasserPhase
GetSecundusPhase
Tese are supposed to tell you the moon phases of the 2 moons, (see help for the values)

Basically, there is a typo, GetSecundusPhase is supposed to be GetSecundaPhase. (Ooopsy?) anywho, I discovered this when I tried to script an object to give you an item when either moon was full, but they always seem to return 0 (new moon) when in an interior cell (another nice little note)

------------------------------------------------------------
There are 10 types of people: those who know binary and those who don't.
-Unknown

Post Extras: Print Post

GhanBuriGhan
(Disciple)
10/11/02 10:37 AM
Re: GetSecundusPhase [re: Amanita] 

A lot of functions are listed and explained in my manual, and I keep adding more, but its a good idea to collect info here and it would help me complete the guide as well.
Heres my faforite function:

AITravel, x,y,z
ActorID -> AITravel x,y,z

Makes an actor travel (walk) to the destination coordinates. Things you need to know:
-The command should only be fired once, continuously firing it in a script makes the actor do nothing except jerk around a bit.
- Distance to the new coordinates can't be too great (about 3000-4000 units, not exactly tested), or the actor will not react.
- Use GetAiPackageDone function to determine when the actor reaches destination.
- Sleeping, teleporting, or fasttraveling will make the actor warp to the end-coordinates, but the GetAiPackageDone function will not fire - this can be a problem, for solutions check my Traveling Merchants plugin.
- z coordinates need only be approximate.
- x, y, z must be literal values. No variables accepted.
- AIpath grid helps, but is not mandatory

---//Forum Scholars guild\\---

Lecturer on Morrowind natural history
Get the "Modern Adventurer" Morrowinds #1 in-game journal

Post Extras: Print Post

Horatio
(Curate)
10/11/02 12:20 PM
Re: GetSecundusPhase [re: GhanBuriGhan] 

'GetInterior' - undocumented, discovered by XP-Cagey. returns 1 if the player is in an interior cell.

'GetHealthRatio' is actually 'GetHealthGetRatio'. returns a float value representing the fraction of health the actor has left. good for scripting stuff like pleading for mercy.

AIEscort and AIFollow. These are my favorite commands, since they allowed me to make guards attack certain NPCs in GIANTS. Use these commands when you want to make a large battle between two opposing sides:

Side A should have their AI set to either AIEscort or AIFollow. I have yet to notice a difference between the two.

Side B should have their Fight set to 100 so they attack the PC on sight.

When Side B, attacks the PC, everyone in Side A will rush to the player's defense (like when those pilgrims you're escorting run out in front of you to get themselves killed by an Ogrim). Thus you get your desired result of a huge chaotic melee.

cheers

h

Post Extras: Print Post

smudgeAdministrator
(Curate)
10/11/02 12:39 PM
Re: GetSecundusPhase [re: Horatio] 

i think this is a great idea and should be pinned

game design is not a democracy
bethesda softworks

Post Extras: Print Post

SpideyKnight
(Acolyte)
10/11/02 08:42 PM
Re: GetSecundusPhase [re: smudge] 

enableracemenu - Change your race, face, hair whatever you want. For the ladies, say you're having a bad hair day, open up the console type in enableracemenu and change your hair to whatever you see fit. Guys too...though if you're out on the road you might want to worry about more than your hair.

enablebirthmenu - Don't like the sign you're born under? Change it.

enableclassmenu - How many people were too busy clicking through menus and got stuck with the "adventurer" class when you wanted to name it something a little more creative? enable class menu opens that menu and allows you to choose a different class.

ra - reset actors. Door won't open because a rat or some other object is either behind it or stuck in it? ra resets all actors for the area you are in. This won't fix the duplicate actor bug I seem to encounter when I change mods a little. Like in vlix's mod, I changed the guard downstairs to Meldor's assistant(wife) and deleted the guard, but now I have Meldor's assistant and a guard. Can't seem to figure that one out.

Edited by SpideyKnight (10/11/02 08:43 PM)

Post Extras: Print Post

FreshFish
(Novice)
10/11/02 09:07 PM
Language Syntax [re: Amanita] 

set = "set" HSP VAR "to" HSP (LITNUM | GLOBAL | LOCAL | ("(" HSP (FUNC | EXPR2) HSP ")"))

if = "if" HSP "(" (LITNUM | VAR | FUNC) HSP MATHCOMP HSP (LITNUM | VAR | FUNC) HSP ")"

elseif = assumed same as if
else = "else"
endif = "endif"

while = "while" HSP "(" (LITNUM | VAR | FUNC) HSP MATHCOMP HSP (LITNUM | VAR | FUNC) HSP ")"
endwhile = "endwhile"

Begin = IDENTIFIER
End *1(IDENTIFIER)

-> = (IDENTIFIER "->" OBJECTFUNC) | (IDENTIFIER "->" GLOBALFUNC))
. = IDENTIFIER "." OBJECTVAR
; = ";" TEXT

Post Extras: Print Post

FreshFish
(Novice)
10/11/02 09:15 PM
Re: Language Syntax [re: FreshFish] 

Here's a list of definitions I used, I have chosen to use a formal notation called Backus-Naur Form (BNF) since its as good as any, to exactly define the allowed parameters. I hope everyone will be able to understand this, its not too complicated.

Definitions:

HSP = horizontal space

GLOBAL = global variable

OBJECTVAR = variable defined in a script

LOCAL = local variable ( defined in 'this' script)

FOREIGN = foreign variable ( defined in another script )

VAR = (GLOBAL | LOCAL | FOREIGN)

GLOBALFUNC = global function

OBJECTFUNC = object function

LOCALFUNC = object function operation on 'this' object

FOREIGNFUNC = object function operating on any other object

FUNC = (GLOBALFUNC | LOCALFUNC | FOREIGNFUNC)

LITNUM = a numeric literal ( integer or float )

MATHOP = ("+" | "-" | "*" | "/")

MATHCOMP = ("=" | "<" | ">" | ">=" | "<=")

EXPR2 = (LITNUM | GLOBAL | LOCAL) MATHOP (LITNUM | GLOBAL | LOCAL)

MBFORMAT = a text string optionally containing parameter format specifiers (%f)

TEXT = a text string

IDENTIFIER = a text string to identify an object, if containing spaces then must be quoted

Post Extras: Print Post

FreshFish
(Novice)
10/11/02 09:25 PM
Re: AiTravel [re: GhanBuriGhan] 

I have some additions to this

If the distance to the destination is too far the actor or NPC will not move at all, however GetAiPackageDone will return true on the next frame when the destination has clearly not been reached, if you need to be sure I would suggest testing the current position against your destination before you believe the travel is complete. I have seen the AI refuse in this way to travel distances as short as 2600 units and thats in a straight line, I try to stick to around 2000 these days. The travel also seems to be interupted sometimes if the actor see's something so you should be prepared to reissue the command until you are sure the destination has been reached.

Post Extras: Print Post

FreshFish
(Novice)
10/11/02 09:44 PM
Position [re: Amanita] 

Syntax:

Position, x, y, z, zRot
Position = ID "->Position" [","] LITNUM [","] LITNUM [","] LITNUM [","] LITNUM

Synopsis:
Used to 'move' an existing reference to the specified exterior co-ordinates.
Find the co-ordinates you need in game by walking to that location and typing player->getpos (x|y|z) at the console.
zRot is expressed in minutes ( 60 minutes per degree)

Notes: various people have seen wierd 'bugs' when using this function, I have seen it turn actors inside out and sometimes make them invisible. I would recommend using PositionCell instead which works fine for exterior locations too, just give the name of any exterior cell.

Post Extras: Print Post

FreshFish
(Novice)
10/11/02 09:51 PM
Re: PositionCell [re: Amanita] 

Are you sure about your zRot values?
In my experience this parameter is expressed in minutes ( 60 per degree)
So 90 degrees = 5400 minutes
180 degrees = 10800 minutes etc.

This function may be used to position the object reference in exterior cells. In this case you can give the name of any exterior cell at present although it may be worthwhile finding the correct one for future compatability.

When positioning in exterior cells in this way I have seen the actors collision detection turned of for a time so they will walk through other NPC's.

Post Extras: Print Post

Eldar Mayiere
(Acolyte)
10/12/02 01:19 PM
Re: AiTravel [re: FreshFish] 

From my experience more important that the distance (but it is relevant) is that the starting position and the end position belongs to the same exterior cell.

Post Extras: Print Post

Soralis
(Curate)
10/12/02 08:00 PM
Re: Lets make a command list! [re: Amanita] 

Here's a list from the "A GetPCOutside function?" topic, of undocumented commands, posted by dwilliss (aside from the GetInterior already mentioned):

PayFineThief (alias for PayFine?)
EnableStatReviewMenu
GetFactionReaction
ShowMap
EnableBirthMenu
EnableClassMenu
EnableRaceMenu
EnableNameMenu
RemoveEffects
EnableMagicMenu
EnableMapMenu
EnableInventoryMenu
EnableStatsMenu
GetInterior
GetLineOfSight (alias for GetLOS?)
GetWindSpeed
ModPCCrimeLevel
SetPCCrimeLevel
GetPCCrimeLevel
GetCurrentTime
OutputObjCounts
OutputRefCounts
ResetActors
OutputRefInfo
Help
ToggleScripts
ShowAnim
PurgeTextures
BetaComment
ToggleWater
MOTO
MoveOneToOne
MenuTest
ToggleScriptOutput
ToggleLights

As well as some others by XP-Cagey, functions which are spelled differently from the documentation:

getHealthRatio -> getHealthGetRatio
getInvisible -> getInvisibile
setInvisible -> setInvisibile
modInvisible -> modInvisibile
getSecundusPhase -> getSecundaPhase

And those which don't work:

getPlayerViewSwitch -> getPlayerViewSwitch, (can't be used)
OnRepair -> not in string tables
UsedOnMe -> not in string tables
name -> not in string tables

Also, not listed there, but the Equip command also seems to not work from what I've heard.

Post Extras: Print Post

Serthim
(Novice)
10/12/02 09:38 PM
Re: Lets make a command list! [re: Soralis] 

Anyone know where I can get a list of in-game console cammands? Mainly I just want to know how to change variables (also, how do you make new/modify existing variables? Not in-game of course, in the editor).

Maybe the answers obvious (probably is...) but I can't find it.


Thx in advance.

Post Extras: Print Post

Soralis
(Curate)
10/13/02 03:29 AM
Re: Lets make a command list! [re: Serthim] 

If you just want console commands, you can type 'help' in the console, and it'll give you a list.

For other things, A lot of that information is in the editor's help file. If you go to the help menu bar in the editor, at the top, and select contents, you can view it's listing, and you can look under the topic "scripting" and follow the hyperlinks for information on the basic commands and functions (including console commands) that you can use. (You can get the same thing by opening up the file "Tes construction set.hlp" in the main Morrowind directory.) You can also get some of an idea of scripting by looking at some of the scripts that are in the game, and what they do. (as well as the various tutorials around)

Post Extras: Print Post

Mr_nStuff
(Curate)
10/23/02 02:42 AM
Re: Lets make a command list! [re: Serthim] 

One good place to get alot of in-game console commands is in the TES Construction Set Help file.. While in TESCS click Help/Contents on the menu bar. When the Help Topics window pops up select the Index TAB and type fun.. This will bring you to Functions on the list. Double click Functions and your ready to learn stuff. Typing fun and pressing enter also works.

Also.. In the game if you type sv on the console. It will list all the global variables running in the game.. To change one of them you would simply type set then the variable name followed by to and then the new value.. IE: (set DaysPassed to 365)

__________
 Mr_nStuff

Post Extras: Print Post

maxpublic
(Novice)
10/24/02 03:09 AM
Re: Lets make a command list! [re: Mr_nStuff] 

Of course, a number of functions are undocumented.

If you want to force a PC to join a faction (ex: you get banned from the Thieves Guild because you complete the codebook quest for the Fighters Guild) you can use this function:

PCJoinFaction "whatever guild"

to join any guild or faction in the game. For the Thieves Guild this would be:

PCJoinFaction "Thieves Guild"

There are a number of undocumented goodies in the game.

Max

Post Extras: Print Post

Soralis
(Curate)
10/24/02 04:08 PM
Re: Lets make a command list! [re: maxpublic] 

There are a number of undocumented goodies in the game.

Although PCJoinFaction isn't one of them. It's there in the help file, on the list of functions:

PCJoinFaction [FactionID]        FactionID is optional if it is not added it will use the faction of the npc who called the function

Post Extras: Print Post

FreshFish
(Novice)
10/25/02 08:13 PM
StartScript [re: Amanita] 

This is what the helpfile has to say on StartScript:

This function starts a script running. This is a Global script. It is not attached to any object, so functions like moving, rotating, checking distances and such have no bearing in a global script.

This is nonsense, ever tried starting a script from dialogue? or from an NPC's default script? well it works just fine, any AiTravel or PositionCell functions in the script are applied to the object they were started on. I'm gonna call these 'targeted' scripts. Targeted scripts run all the time just like globals so you can get yer NPC to do stuff when you are in other cells. And if you start another script from a targeted script then that script inherits the same target so you can fork 'em off or chain 'em up or whatever.

So it looks like the limitation of only one small script per object is no more.

I should point out that a targeted script still differs from a 'local' script in that variables defined in the targeted script are not considered local to the object from the point of view of dialogue and other scripts.

If a script is stopped then restarted any variables are preserved, including doOnce type variables so if you are planning on using your script again you may need to reinitialise some stuff yourself.

I dont know what happens if you try to start a targeted script on more than one target simultaneously but I doubt it would be pretty.

StartScript = ("StartScript" IDENTIFIER) | (IDENTIFIER "->StartScript" IDENTIFIER)

Post Extras: Print Post

Vincent Dragon
(Diviner)
10/25/02 08:25 PM
Re: Lets make a command list! [re: Soralis] 

wow awesome thread.!!!!

NO SIGNATURE PICS ALLOWED - !!
If You are Strong - pretend weak
If You are Weak - pretend strong
This way enemy will fight with his own phantoms created by his imagination

http://thelys.free.fr/vincent/

Post Extras: Print Post

Cortex
(Initiate)
10/29/02 07:46 AM
Re: StartScript [re: FreshFish] 

Does the "targeted script" remain with the object that started it beyond one cycle ? If so very interesting ...

Cortex

Post Extras: Print Post

FreshFish
(Novice)
10/29/02 03:58 PM
Re: StartScript [re: Cortex] 

Yep sure does, so far I have chained together 18 scripts this way which run over a span of a few days game time and no problems so far.

Post Extras: Print Post

Horatio
(Curate)
10/29/02 04:10 PM
Re: StartScript [re: FreshFish] 

no shiat! that's fantastic. good work freshfish.

question:

can you start one script on an object, then after it stops, start a second, different script on the same object?

what about objects that already have a "local" script attached? are there any conflicts?

cheers

h

Post Extras: Print Post

FreshFish
(Novice)
11/01/02 08:43 PM
Re: StartScript [re: Horatio] 

>can you start one script on an object, then after it stops, start a second,
>different script on the same object?

You can start a second different script on the same object any time you like, no need to wait for the first to finish. Whether this causes a conflict or not is down to what you do in your scripts, cant walk in two directions at once, obviously.

>what about objects that already have a "local" script attached?
>are there any conflicts?

No problems here either, I have an NPC with a local script which puts on a robe when it rains and also uses a 'targeted' script to make her follow another NPC sometimes.

Post Extras: Print Post

Elim
(Layman)
11/04/02 04:48 AM
Playercentric cast and drop [re: Amanita] 

Am I just stupid, or does

Cast spellID target

only work if the target is player?
Why does

drop itemID cout

always drop the item to the feet of the player, regardless of who is calling this function?! It does recognize the calling actor, since the Item disappeares from his Inventory, but it is placed right at the players feet...

Post Extras: Print Post

intelligentsia
(Acolyte)
11/05/02 06:17 PM
Re: Playercentric cast and drop [re: Elim] 

OnPCDrop - doesn't seem to be recognised by the editor. However, OnPCAdd *does* work......

marksman mod maker
http://thelys.free.fr/intelligentsia/

wizards' alliance team member
http://wizards-islands.com/

GIANTS team member
http://thepumaman.freehomepage.com/

Post Extras: Print Post

Soralis
(Curate)
11/06/02 12:10 AM
Re: Playercentric cast and drop [re: intelligentsia] 

Hmm.. I've used OnPCDrop, and it's worked for me. In my Crystal Weather mod (which I did sort of as a test of the scripting and such), when you're holding a certain object, the effects of a spell to change the weather are permanent, but if you aren't carrying it, or put it down, the effects are temporary. And I've tested it and it works as intended in my scripts.

Post Extras: Print Post

GhanBuriGhan
(Disciple)
11/06/02 07:19 AM
Re: StartScript [re: FreshFish] 

Highly intersting, good catch FreshFish!

Now reading what I just wrote made me laugh





----------//Forum Scholars guild\\----------

Get "MW scripting for dummies" TES scripting manual

Post Extras: Print Post

Elim
(Layman)
11/07/02 08:57 AM
Re: Playercentric cast and drop [re: intelligentsia] 

OnPCDrop works perfectly - you just have to declare with short OnPCDrop, since it is not a function, but a variable which is set by the game if it is declared!

I meant the DROP - command, which should drop an Item at the feet of the calling actor, but does drop it at the feet of the player, no matter who calls it!

Post Extras: Print Post

Elim
(Layman)
11/07/02 09:08 AM
Re: GetSecundusPhase [re: Amanita] 

I've experimented with the moonfunctions and I'm quite sure they are not allways 0 in Interior cells but keep their last state since you've been outside. I recently overslept the half moon phase and got crescant in my interior cell though it was already gibbous phase outside!

But why are the phases the same on both moons? I remember the Redguard-Manual mentioning something about Kajit that were born under full Masser and a Secunda crescent...

Post Extras: Print Post

FreshFish
(Novice)
11/08/02 10:05 PM
Re: Playercentric cast and drop [re: Elim] 

>Am I just stupid, or does
>Cast spellID target
>only work if the target is player?

Yes, it seems that way to me too. The only thing I can add on this is that inanimate objects can cast spells on you too, you probably already knew that though.

Post Extras: Print Post

Soralis
(Curate)
11/12/02 06:26 PM
Re: Playercentric cast and drop [re: FreshFish] 

SetDelete, after working though using it with some help, I'll pass on some useful information on it:

Use "SetDelete, 1" To mark on object to be deleted/not saved in a save game. Objects that have been put in the world with the editor (or perhaps those already saved in the game) seem to stay in place when it's used on them, until a save/load has happened, and a "SetDelete, 0" could be used on them to undo the effect. Items that are placed however, using PlaceAtPC, or PlaceItem, are immediately deleted from the world.

There are a couple of things that should be done to make this work, as I had some problems with using it crashing the game otherwise. If you use this on an object, give it a bit of time of inactivity before you delete it, and Disable it ahead of time. So you could put something like this in your script near the top, as an example:

if ( deleteobj = 1 ) ;Local variable, set when you want to delete

if ( deletetimer == 0 )
Disable
endif
if ( deletetimer < 10 )
set deletetimer to ( deletetimer + 1 )
endif
if ( deletetimer == 10 )
SetDelete, 1
endif
Return
endif

That way, with the return, it stops the rest of the script if it's up near the top of it (below where you setup the variables though), and disables it, and gives it a bit of time before it's deleted. It may not need 10 frames, but that's not long, and it worked in my scripts

It can be quite a useful function in scripting things, as it allows for a script to use PlaceAtPC or PlaceItem scripts or such to create items within the world, at different locations, or different situations, where you may want to delete such items after.

Post Extras: Print Post

FreshFish
(Novice)
11/15/02 09:23 PM
Re: Playercentric cast and drop [re: Soralis] 

This sounds a lot like DontSaveObject to me only I hear that one doesnt work. Only thing is I dont see it in the command list and I thought mine was complete, this isnt a Tribunal addition is it?

Post Extras: Print Post

Soralis
(Curate)
11/16/02 05:50 PM
Re: Playercentric cast and drop [re: FreshFish] 

It is a Tribunal addition, although it's also not in the Tribunal help file as far as I've seen.

Post Extras: Print Post

GhanBuriGhan
(Disciple)
11/18/02 04:30 AM
Re: Playercentric cast and drop [re: Soralis] 

Thanks for the info Soralis. You dont mind if I use this for a future manual update?

----------//Forum Scholars guild\\----------

Get "MW scripting for dummies" TES scripting manual

Post Extras: Print Post

Soralis
(Curate)
11/18/02 09:17 PM
Re: Playercentric cast and drop [re: GhanBuriGhan] 

Sure, go ahead. It seems like it can still cause crashes at times. But I don't know if that's just on my computer, because I've been having some other errors, and someone else who tried my program had no problems with it..

Post Extras: Print Post

FreshFish
(Initiate)
11/23/02 11:29 AM
Re: StartScript [re: FreshFish] 

Okay, now I know what happens when you try to run a targeted script on more than one target simultaneously - nothing, damn thing won't allow you to run a 'global' script more than once at a time. When you call StartScript again there are no error messages or anything but this second call does not start the script. If you want to run the script on another target you have to wait until the first one finishes. Yet another of the frustrating little limitations of TES3 script I guess, well there goes another fine idea.

Post Extras: Print Post

FreshFish
(Initiate)
11/23/02 11:57 AM
MoveWorld [re: Amanita] 


MoveWorld <x or y axis> <speed>
MoveWorld <z axis> <units>
MoveWorld = "MoveWorld" ("x"|"y"|"z") LITNUM

This function moves the object it is attached to along the given axis.
My purpose here is to explain the <speed> parameter, this seems rather strange to me in that the units of speed are game units per second. This does not imply that the object will continue moving at the given speed once started however, this speed is only maintained if the function is called every loop of your script.

Since the rate the scripts are run at is dependant on the graphical frame rate this means that each call to MoveWorld does not necessarily move the same distance. So how far does it move each frame? well that depends on how long the frame lasts, thankfully there is GetSecondsPassed to tell us this.
So to move an object a desired distance each frame we can use:

MoveWorld x ( mydistance / GetSecondsPassed )

Now obviously MoveWorld does noy accept varaiables ( pre Tribunal ? ) so how do we move this distance? Well thankfully MoveWorld can be called multiple times per frame, no problem and the effect is cumulative. So lets make a nice loop then.

float mydistance
set mydistance to ( 50 / GetSecondsPassed )

while ( mydistance > 0 )
MoveWorld x 1
set mydistance to ( mydistance - 1 )
endwhile

This example code will be horribly slow moving at one unit per loop but pad it out with some larger increments and you can move stuff across the map, sorted.

Another wierdness is MoveWorld z, here the units appear to be game distance units rather than speed, ie the target moves the specified distance in one frame, dont ask me why.

Post Extras: Print Post

MrFunklemeyer
(Novice)
11/27/02 03:17 PM
Re: Lets make a command list! [re: Serthim] 

basically you can do most of these commands right in the console Serthy

just denote what object you want it to effect, and then type the command, and then th associated value

-MrF

AIM - candymasochy
MSN - nosoultosell@hotmail.com
Yahoo - sovreighnity

Post Extras: Print Post

JDGBOLT
(Novice)
11/27/02 05:27 PM
Re: Playercentric cast and drop [re: Elim] 

I think the Drop function will work for a calling actor. I noticed that in the slave scripts, the drop function does in fact work, when you unlock a slaves bracers then they drop it at the feet of themselves. That is one thing that I noticed.
JDGBOLT

Post Extras: Print Post

FreshFish
(Initiate)
11/29/02 08:03 PM
Re: AiTravel [re: Eldar Mayiere] 

I hadnt noticed that myself at the time so I didnt say anything. Now after starting a new mod in Vivec I've seen what you say a few times, at first I thought it was just a messed up path grid where the points didnt match between cells but after fixing the path grids they still wouldnt move.

So, the way I think it works now is
1) Using the path grid in my current cell can I get there?
2) Can I walk in a straight lineand get there?

If the NPC can get there by path grid then they will travel much larger distances, probably the whole cell. If the NPC is walking in a straight line then the distance limit applies.
So generally NPCs will walk around corners in cities, in the countryside its straight lines only ( or you can add your own path grids ).

Post Extras: Print Post

FreshFish
(Initiate)
12/06/02 10:53 PM
Re: StartScript [re: FreshFish] 

So, I just thought I would add this bit of information here.
When you call StartScript when does the script actually start?
Well I cant think of a way of determining this exactly, does the script run this frame or next frame? But what I do know is that is will run before the script which launched it runs again, get that?

Script1 frame x calls StartScript script2
Script2 frame ? does whatever
Script1 frame x+1

Since I cant figure of a way of testing if the script starts this frame of next perhaps it doesnt matter at all so long as it runs between now and the next frame.

So what? I hear you ask, well its useful to me, maybe others can see why too.

Post Extras: Print Post

FreshFish
(Initiate)
12/17/02 05:10 PM
Re: Language Syntax [re: FreshFish] 

No interest in this from anyone? I cant be the only one getting unexpected EXPRESSION EVAL errors, dont you just hate those?

Post Extras: Print Post

FreshFish
(Initiate)
12/22/02 05:00 PM
SetAlchemy and others [re: Amanita] 

So, first to document this function, its purpose is obvious is it not?


SetAlchemy <value>
SetAlchemy = "SetAlchemy" ( LITNUM | VAR )

This function sets a characters alchemy skill to the given value, this is one of the few functions which accept a variable as the parameter, so thats good.

Whats not obvious is the range of acceptable values for a skill, its not just 0-100 as you might expect. In fact skills appear to be stored as a float so you can set some large numbers in there, but there are some checks: you cant set negative values, and decimal points are discarded when saving/loading.
Floats have a precision of 7 digits I think, so you can store most numbers you would like in there.

I dont know if this is true of all skills, I only checked the ones an NPC is least likely to need, these are the ones I checked: GetSpeechcraft, GetSecurity, GetSneak, GetAlchemy.

Post Extras: Print Post

Dagoth Vivec
(Initiate)
12/28/02 07:31 PM
Re: Language Syntax [re: FreshFish] 

You forgot Additem and removeitem. Those are necessary for the shrine scripts and others when you want a quest giver to give you an item.

I am master enchanter PM me for some good ideas for enchantments.

"After I kill you, I will rape your corpse. Don't worry, i'll be gentile" -- Anhaedra the Daedra

Post Extras: Print Post

zingbat
(Novice)
01/26/03 08:13 AM
Re: Language Syntax [re: Dagoth Vivec] 

This may be a silly question but what's the first script called when the game starts ?

Post Extras: Print Post

Stormscape
(Novice)
01/30/03 02:08 AM
Re: Language Syntax [re: zingbat] 

its silly.... its called main and don't touch it! AT ALL! KEEP IT THE SAME!!! DANGER WILL ROBINSON! DANGER!
If you change it... if you have a mod that mods it... the mod gets fuxored!

Post Extras: Print Post

Dave Humphrey
(Initiate)
01/30/03 01:01 PM
Re: Lets make a command list! [re: Amanita] 

Just to let people know, I've created an exhaustive function list at

http://www.m0use.net/~uesp/morrow/editor/mw_cscommands.shtml

Hoppefully I got the spelling right, hehe.

Dave Humphrey
The Unofficial Elder Scrolls Pages
http://www.m0use.net/~uesp/
MW Code: ES++ FQ CP-- ED++ BT++ MP++ B++ BL+ D S R+ F++++ 3P G CS+++ C N SF- V+ KA+++ SK+++ L+ P !JP

Post Extras: Print Post

FreshFish
(Initiate)
01/31/03 11:12 PM
Re: MoveWorld [re: FreshFish] 

For those viewing in flat mode, this is a post about MoveWorld

Now I'm not so sure about that last part, sometimes the z axis units seem to be speed and sometimes distance, I think it may depend on the object type but I cant figure it out.

I would also like to add that this function only works on objects in a loaded cell even when called from a global script, if the objects not loaded it does nothing at all.

Post Extras: Print Post

FreshFish
(Initiate)
01/31/03 11:26 PM
CellUpdate and FixMe [re: Amanita] 

Wierd combination huh?

So, I'm still not running Tribunal so for all I know CellUpdate was fixed. If not then keep readin'

Sometimes when yer moving objects around a lot you find you need to call CellUpdate like it tells yer to in the helpfiles, only it dont work. So what do you do? Well what I've done with some degree of success is call 'fixme' instead. Its not brilliant 'cause theres a delay of a couple of seconds while the game seems to reload your cell but if you can live with that then its better than nothing.

I found when moving stuff half way across the world that the textures would get messed up and when I looked at the object from different angles the game tried to use textures that presumably dont exist and subsequently crashed, this work around fixed that right up.

Yes you can call fixme from scripts, who knew?

Post Extras: Print Post

zingbat
(Novice)
02/01/03 01:18 PM
Re: Language Syntax [re: Stormscape] 

So you are saying that we *can* actually select and edit this main script ?

Interesting.

Post Extras: Print Post

zingbat
(Novice)
02/01/03 01:31 PM
Re: Language Syntax [re: zingbat] 

I have some questions about the coordinates and rotation values.

When we use a x value or a z value is this a value similar to 3dstudio units ? Is 128 z-units the same as a NPC height ?

The coordinate system in Morrowind is Z up/down, Y far away/closer to the player ?

Does this depends of the direction the player is facing (relative to the camera) or Y direction is allways north/south, X direction is allways east/west and Z direction is alllways straight up/straight down (world coordinates) ?


Post Extras: Print Post

BlazeFallow
(Layman)
02/08/03 09:05 PM
Re: MoveWorld [re: FreshFish] 

>Another wierdness is MoveWorld z, here the units appear to be
>game distance units rather than speed, ie the target moves the
>specified distance in one frame, dont ask me why.

This could be for ease in scripting the Nchuleftingth wall/door thing...
where you turn the crank and the door moves up, they wanted it to
move fast so that you wouldn't be able to see where it went if you
turned around fast enough

This is the part of the script i speak of

> Rotate X 80
>
> ;should move pretty fast to avoid player seeing it close up

> "in_dwrv_wall_nchuleftingth1"->MoveWorld Y 80

Post Extras: Print Post

MortisNai
(Acolyte)
02/17/03 01:07 AM
Re: MoveWorld [re: BlazeFallow] 

I dont know if this has been added yet, but ill put it in anyway


This is from a web site I found

Wielder of Crystalis's Home Page


The Elder Scrolls: Construction Set is able to convert .esp files into .esm files. This function is called "Merge to Masters". This button, once enabled, will take an Active .esp file, and make it into an .esm file. However, this capability is not enabled by default. Luckily (once I found it), it's very easy to implement.
Here are the steps you need to follow in order to enable Merge to Masters:

1) First find out what name you log into Windows under. ONe of the best ways to find this out is to browse to the folder that Morrowind is installed in (by default this is - C:\Program Files\Bethesda Softworks\Morrowind). Then open the file ProgramFlow.txt. The entry after "Computer Name" is what you need.

2) Now that you know your username, open up the Morrowind.ini file. Search through the file for the section (if you don't have it, you can just add it):

Under (WHO CAN MERGE)
Type
Username=1

So for example I would be

(Who Can Merge)
Jay=1

And while your there look in the General section and add

AllowMultipleEditors=1


So, what does this do for you? Well, now if you'll open up the Elder Scrolls: Construction Set, then choose open to select your active files, you'll notice a little difference. Namely a new button. The "Merge to Masters" button. If it's disabled (as below) just check mark one of your .esp files and click the "Set as Active File" button.

Now, whatever you do, don't go making all of your .esp files into .esm files. The only kinds of .esp files that I suggest making into .esm files are the blank ones that can stand-alone. The following link is a link to one I found on the internet. It had a very annoying bug involving crashing to desktop when you started a new game after already being in a game. But, I fixed it by adding some scripts that were apparently required by the game.

All that this file consists of is a few wilderness cells and an interior cell called "Imperial Prison Ship" (which is needed by the game unfortunately). This .esp file and the "Merge to Masters" function is all you need to start creating your own worlds from scratch.

Now, the only other thing... you might be wondering if there's anything else you can do with this button.... well, I believe you can use it to combine downloaded plugins with master files, in doing that you should be able to put all the official (or unofficial) plugins into the master file... but I'm not sure, so if you try it, and it messes up... OOPS!!! You're problem!!


Download the Blank.esp from

http://www.usao.edu/~stuknightt/morrowind/blank.esp


______________________________________
The Surest Way to corrupt our youth is to teach him to hold in higher esteem, those whom think alike as opposed to those whom think differently.

Friedrich Nietzsche - The Dawn

Post Extras: Print Post

Pages in this thread: 1 | 2 | 3 | 4 | (show all)   Print Thread

Jump to

Contact Us The Elder Scrolls Homepage


UBBThreads™ 5.5.1
Click for Privacy Statement © 2002 Bethesda Softworks LLC, a ZeniMax Media company. All Rights Reserved.
PRIVACY POLICY | TERMS & CONDITIONS | LEGAL INFORMATION